/**
 * Copyright (c) 2014-2015, Suredy technology Co., Ltd. All rights reserved.
 * @author ZhangMaoren 
 * @since 2015年4月13日
 * @version 0.1
 */
package com.suredy.config.model;

import java.util.Arrays;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.suredy.core.model.BaseModel;




/**
 * @author ZhangMaoren
 *
 */
@Entity
@Table(name = "T_CONFIG_FILETYPE")
public class FileTypeConfig extends BaseModel {
	
	
	private static final String separator = "|";
	/**
	 * 
	 */
	private static final long serialVersionUID = 1261335209089887078L;
	
	@Column(length = 128)
	private String fileTypeCode;
	
	@Column(name = "NAME", length = 128)
	private String name;
	
	@Column(name="APPID", length=255)
	private String appId;
	
	@Column(length = 255)
	private String newURI;
	
	@Column(length = 255)
	private String openURI;
	
	@Column(length = 255)
	private String flowUN;
	
	@Column(name = "TEMPLATEID", length = 255)
	private String templateId;
	
	@Column(name = "SNMODEID", length = 1024)
	private String snmodeId;
	
	@Column(name = "ESEALID", length = 1024)
	private String esealId;

	@Column(name = "STATUS")
	private Byte status;
	
	@Column(name = "DESCRIPTION" , length = 1024)
	private String description;
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	
	/**
	 * @return the newURI
	 */
	public String getNewURI() {
		return newURI;
	}

	
	/**
	 * @param newURI the newURI to set
	 */
	public void setNewURI(String newURI) {
		this.newURI = newURI;
	}

	/**
	 * @return the openURI
	 */
	public String getOpenURI() {
		return openURI;
	}

	
	/**
	 * @param newURI the newURI to set
	 */
	public void setOpenURI(String openURI) {
		this.openURI = openURI;
	}
	
	/**
	 * @return the flowUN
	 */
	public String getFlowUN() {
		return flowUN;
	}

	
	/**
	 * @param flowUN the flowUN to set
	 */
	public void setFlowUN(String flowUN) {
		this.flowUN = flowUN;
	}

	
	/**
	 * @return the templateId
	 */
	public String getTemplateId() {
		return templateId;
	}

	
	/**
	 * @param templateId the templateId to set
	 */
	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}

	
	/**
	 * @return the snmodeIds
	 */
	public String getSnmodeId() {
		return snmodeId;
	}

	
	/**
	 * @param snmodeIds the snmodeIds to set
	 */
	public void setSnmodeId(String snmodeId) {
		this.snmodeId = snmodeId;
	}

	
	/**
	 * @return the esealIds
	 */
	public String getEsealId() {
		return esealId;
	}

	
	/**
	 * @param esealIds the esealIds to set
	 */
	public void setEsealId(String esealId) {
		this.esealId = esealId;
	}
	

	
	/**
	 * @return the status
	 */
	public Byte getStatus() {
		return status;
	}


	
	/**
	 * @param status the status to set
	 */
	public void setStatus(Byte status) {
		this.status = status;
	}

	
	

	
	/**
	 * @return the appId
	 */
	public String getAppId() {
		return appId;
	}


	
	/**
	 * @param appId the appId to set
	 */
	public void setAppId(String appId) {
		this.appId = appId;
	}


	
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}


	
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}


	public List<String> getESealNames(){
		String[] ids = this.esealId.split(separator);
		return Arrays.asList(ids);
	}
	
	public List<String> getSNModeNames(){
		String[] ids = this.snmodeId.split(separator);
		return Arrays.asList(ids);
	}
	
}
